package edu.erpan.bl.entities;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the lineas_detalle_ingreso_mp database table.
 * 
 */
@Embeddable
public class LineaDetalleIngresoMpPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="materia_prima_idmateria_prima", unique=true, nullable=false)
	private int materiaPrimaIdmateriaPrima;

	@Column(name="id_recepcion_materia", unique=true, nullable=false)
	private int idRecepcionMateria;

    public LineaDetalleIngresoMpPK() {
    }
	public int getMateriaPrimaIdmateriaPrima() {
		return this.materiaPrimaIdmateriaPrima;
	}
	public void setMateriaPrimaIdmateriaPrima(int materiaPrimaIdmateriaPrima) {
		this.materiaPrimaIdmateriaPrima = materiaPrimaIdmateriaPrima;
	}
	public int getIdRecepcionMateria() {
		return this.idRecepcionMateria;
	}
	public void setIdRecepcionMateria(int idRecepcionMateria) {
		this.idRecepcionMateria = idRecepcionMateria;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof LineaDetalleIngresoMpPK)) {
			return false;
		}
		LineaDetalleIngresoMpPK castOther = (LineaDetalleIngresoMpPK)other;
		return 
			(this.materiaPrimaIdmateriaPrima == castOther.materiaPrimaIdmateriaPrima)
			&& (this.idRecepcionMateria == castOther.idRecepcionMateria);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.materiaPrimaIdmateriaPrima;
		hash = hash * prime + this.idRecepcionMateria;
		
		return hash;
    }
}